<template>
	<nx-page>
		<!-- 		<view class="box">
			<view class="uni-flex uni-align-center uni-pa-10">
				<view class="nx-title-line"></view>
				<view class="uni-mx-8 uni-info">详情</view>
				<view class="nx-title-line"></view>
			</view>
		</view>
		<nx-agreement v-model="agree" @link="link"></nx-agreement> -->
		<view class="uni-bg-color-bg">
			<nx-search v-model="txt"></nx-search>
		</view>

		<view class="uni-mt-8">
			<button @click="test">获取头像昵称</button>
		</view>
		<nx-userinfo v-if="show" :data="userinfo" @confirm="handleConfirm" @cancel="handleCancel"></nx-userinfo>
	</nx-page>
</template>

<script setup>
	import {
		onMounted,
		ref
	} from "vue";
	import api from "@/api";
	import {
		pageConfig
	} from "@/config";
	import {
		useRouter
	} from '@/uni_modules/nx-utils/js_sdk/index.js'

	const txt = ref('666')

	const agree = ref(false)
	const listRef = ref()
	const extraParams = ref({
		searchStr: '123',
		sort_type: 0,
		with_coupon: true,
		optId: ''
	})

	const {
		toPage,
		toTab,
		closedTo
	} = useRouter()

	const link = (val) => {
		console.log(val);
	}

	const userModule = ref()

	const userinfo = ref({
		nickname: '',
		avatarUrl: ''
	})

	const test = () => {
		show.value = true
	}

	const show = ref(false)
	const handleConfirm = (data) => {
		console.log(data);
		show.value = false
	}
	const handleCancel = () => {
		show.value = false
	}
</script>

<style scoped lang="scss">
	.box {}
</style>